<div class="fly-header layui-bg-black">
  <div class="layui-container">
    <a class="fly-logo" href="/">
      <img src="{:get_source_link(get_system_config('site_logo'))}" alt="layui">
    </a>
    <ul class="layui-nav fly-nav layui-hide-xs">
      {volist name='list_nav' id='nav'}

      <li class="layui-nav-item">
        <a href="{$nav.value}"><i class=""></i>{$nav.title}</a>
      </li>
      {/volist}
    </ul>

    <ul class="layui-nav fly-nav-user">
      {empty name='user'}

      <!-- 未登入的状态 -->
      <li class="layui-nav-item">
        <a class="iconfont icon-touxiang layui-hide-xs" href="{:url('Login/index')}"></a>
      </li>
      <li class="layui-nav-item">
        <a href="{:url('Login/index')}">登入</a>
      </li>
      <li class="layui-nav-item">
        <a href="{:url('Login/register')}">注册</a>
      </li>

      {else /}
      <!-- 登入后的状态 -->

      <li class="layui-nav-item">
        <a class="fly-nav-avatar" href="javascript:;">
          <cite class="layui-hide-xs">{$user.nickname}</cite>
          {eq name='$user.auth_status' value='1'}

          <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息:{$user.auth_content}"></i>
          {/eq}
          <i class="layui-badge fly-badge-vip layui-hide-xs">{$user.vip.title|default="VIP0"}</i>
          <img src="{$user.avatar_src}">
        </a>
        <dl class="layui-nav-child">
          <dd><a href="{:url('User/index',['id'=>$user.id])}"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
          <dd><a href="{:url('Post/my')}"><i class="layui-icon layui-icon-release"></i>我的帖子</a></dd>
          <dd><a href="{:url('User/set')}"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
          <dd><a href="{:url('User/message')}"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
          <hr style="margin: 5px 0;">
          <dd><a href="{:url('Login/logout')}" style="text-align: center;">退出</a></dd>
        </dl>
      </li>
      {/empty}
    </ul>
  </div>
</div>